package com.bojx.report.validation;

import com.jfinal.core.Controller;
import com.jfinal.validate.Validator;

public class LoginValidation extends Validator {

	@Override
	protected void validate(Controller c) {
		validateRequired("username", "userMsg", "用户名不能为空！");
		validateRequired("password", "pwdMsg", "密码不能为空！");
	}

	@Override
	protected void handleError(Controller c) {
		c.keepPara("usereMsg");
		c.keepPara("pwdMsg");
		c.render("index.html");
	}

}
